package com.yxdj.user.api.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yxdj.common.core.annotation.Excel;
import com.yxdj.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 用户地址信息对象 address
 *
 * @author mty
 * @date 2025-03-18
 */
@Data
@Schema(description = "Address类")
public class Address extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 地址ID，主键，自增
     */
    @Schema(description = "地址ID，主键，自增")
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID，关联用户表
     */
    @Schema(description = "用户ID，关联用户表")
    private Long userId;

    /**
     * 省
     */
    @Excel(name = "省ID")
    @Schema(description = "省ID")
    private Long provinceId;

    /**
     * 市
     */
    @Excel(name = "市ID")
    @Schema(description = "市ID")
    private Long cityId;

    /**
     * 区/县ID
     */
    @Excel(name = "区/县ID")
    @Schema(description = "区/县ID")
    private Long districtId;

    @Excel(name = "省名称")
    @Schema(description = "省名称")
    @TableField(exist = false)
    private String provinceName;

    @Excel(name = "市名称")
    @Schema(description = "市名称")
    @TableField(exist = false)
    private String cityName;

    @Excel(name = "区/县名称")
    @Schema(description = "区/县名称")
    @TableField(exist = false)
    private String districtName;

    /**
     * 详细地址
     */
    @Excel(name = "详细地址")
    @Schema(description = "详细地址")
    private String detailAddress;

    /**
     * 楼号或门牌号
     */
    @Excel(name = "楼号或门牌号")
    @Schema(description = "楼号或门牌号")
    private String buildingOrHouseNumber;

    /**
     * 联系人姓名
     */
    @Excel(name = "联系人姓名")
    @Schema(description = "联系人姓名")
    private String contactName;

    /**
     * 手机号码
     */
    @Excel(name = "手机号码")
    @Schema(description = "手机号码")
    private String phoneNumber;

    /**
     * 是否是默认地址
     */
    @Excel(name = "是否是默认地址")
    @Schema(description = "是否是默认地址")
    private Long isDefault;

}
